package com.uploader.config;

import com.uploader.utils.FileUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
public class ApplicationConfig implements ApplicationRunner {

    @Autowired
    private FileUtils fileUtils;

    @Override
    public void run(ApplicationArguments args) {
        // 初始化文件目录
        fileUtils.initDirs();
        System.out.println("文件上传目录初始化完成");
    }
}